Skip to main content
Contiem Connect

Building with MSBUILD

HelpStudio includes a custom MSBUILD task which can be used to integrate the build of documentation with your MSBUILD-based build process.

MSBUILD Task Assembly Location

The Contiem Connect MSBUILD Task assembly file is named Contiem. DocumentX.Build.dll and can be found in a \bin sub-directory below the HelpStudio installation path. The default bin path is C:\Program Files\Innovasys\HelpStudio2024\bin.

The MSBUILD Task Assembly requires other HelpStudio assemblies and should not be moved from the installation path.

Builds executed using the MSBUILD task require a full installation of HelpStudio. If you are integrating with a build on a build server, you must install a licensed copy of HelpStudio on the build server.

Integrating the Custom MSBUILD Task

To integrate the build of a HelpStudio project with your MSBUILD process, follow these steps:

  1. Open your MSBUILD project file (e.g. .proj, .vbproj, .csproj file) in Notepad.
    The project file is actually an MSBUILD XML file that you will edit to add HelpStudio to the build tasks. For more information on MSBUILD, see the MSBUILD documentation on MSDN.
  2. Add references to the MSBUILD task assembly in the file, as below:
    <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
    ...
    </PropertyGroup>
    ...
    <ItemGroup>
    ...
    </ItemGroup>
    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    <UsingTask AssemblyFile="[BinPath]\Contiem.DocumentX.Build.dll" TaskName="ProjectBuildTask" />
    <Target Name="GenerateDocumentation" Condition=" '$(Configuration)' == 'Release' ">
    <Contiem.DocumentX.Build.ProjectBuildTask ProjectFileName="documentation\documentation.hsp"/>
    </Target>
    </Project>
  3. Replace [BinPath] in the sample above with the location of the assembly containing the MSBUILD task, outlined in the "MSBUILD Task Assembly Location" section earlier in this topic.
  4. Replace the ProjectFileName attribute value in the sample above with the location of your Contiem Connect project file - either a full path and filename or a path relative to the MSBUILD project file.
  5. If required, you can also specify a BuildConfigurationName attribute to identify a specific saved Build Configuration to build. If no BuildConfigurationName is specified, the first Build Profile is built. Example of Task XML specifying a Build Configuration:

    <Contiem.DocumentX.Build.ProjectBuildTask
    ProjectFileName="documentation\documentation.hsp"
    BuildConfigurationName="MyBuildConfigurationName"/>

See Also

Top of page